package com.jy.wms.common.quartz;

import com.jy.wms.pojo.WmsStock;
import com.jy.wms.service.WmsGoodsAlarmService;
import com.jy.wms.service.WmsReportsService;
import org.quartz.Job;
import org.quartz.JobDataMap;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.annotation.Resource;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;

/**
 * 货品库存总数量
 * @author liyi
 */
public class WmsReportsAlarmScheduledJob implements Job {
    private WmsReportsService wmsReportsService;
    private static Logger log = LoggerFactory.getLogger(wmsGoodsAlarmScheduledJob.class);
    private SimpleDateFormat dateFormat() {
        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
    }

    @Override
    public void execute(JobExecutionContext context) throws JobExecutionException {
       try {
            JobDataMap dataMap = context.getJobDetail().getJobDataMap();
            wmsReportsService = (WmsReportsService)dataMap.get("wmsReportsService");
             wmsReportsService.quantity();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
